#coding: utf-8

import RPi.GPIO as GPIO

GPIO.cleanup()
GPIO.setmode(GPIO.BCM)

def gpiosetup(number, flags):
	number = int(number)
	flags = int(flags)
	if flags == 0:
		GPIO.setup(number, GPIO.OUT)
	elif flags == 1:
		GPIO.setup(number, GPIO.IN)

def gpiooutput(number, flags):
	number = int(number)
	flags = int(flags)
	if flags == 0:
		GPIO.output(number, 0)
	elif flags == 1:
		GPIO.output(number, 1)